import 'package:xin_he/generated/json/base/json_field.dart';
import 'package:xin_he/generated/json/xin_he_order_item_model_entity.g.dart';
import 'dart:convert';

@JsonSerializable()
class XinHeOrderItemModelEntity {
	String? buyerRemark;
	String? code;
	String? createTime;
	String? distributionType;
	int? freightFee;
	int? goodsFee;
	int? id;
	String? mobile;
	int? orderAmount;
	int? orderFee;
	List<XinHeOrderItemModelOrderItems>? orderItems;
	int? orderPayFee;
	String? payTime;
	int? preferentialFee;
	String? remark;
	int? remindSend;
	String? remindSendTime;
	String? sellerIconPath;
	String? sellerName;
	int? sellerUserId;
	String? sendTime;
	int? shopId;
	String? status;
	String? type;
	int? userId;
	String? userName;

	XinHeOrderItemModelEntity();

	factory XinHeOrderItemModelEntity.fromJson(Map<String, dynamic> json) => $XinHeOrderItemModelEntityFromJson(json);

	Map<String, dynamic> toJson() => $XinHeOrderItemModelEntityToJson(this);

	XinHeOrderItemModelEntity copyWith({String? buyerRemark, String? code, String? createTime, String? distributionType, int? freightFee, int? goodsFee, int? id, String? mobile, int? orderAmount, int? orderFee, List<XinHeOrderItemModelOrderItems>? orderItems, int? orderPayFee, String? payTime, int? preferentialFee, String? remark, int? remindSend, String? remindSendTime, String? sellerIconPath, String? sellerName, int? sellerUserId, String? sendTime, int? shopId, String? status, String? type, int? userId, String? userName}) {
		return XinHeOrderItemModelEntity()
			..buyerRemark= buyerRemark ?? this.buyerRemark
			..code= code ?? this.code
			..createTime= createTime ?? this.createTime
			..distributionType= distributionType ?? this.distributionType
			..freightFee= freightFee ?? this.freightFee
			..goodsFee= goodsFee ?? this.goodsFee
			..id= id ?? this.id
			..mobile= mobile ?? this.mobile
			..orderAmount= orderAmount ?? this.orderAmount
			..orderFee= orderFee ?? this.orderFee
			..orderItems= orderItems ?? this.orderItems
			..orderPayFee= orderPayFee ?? this.orderPayFee
			..payTime= payTime ?? this.payTime
			..preferentialFee= preferentialFee ?? this.preferentialFee
			..remark= remark ?? this.remark
			..remindSend= remindSend ?? this.remindSend
			..remindSendTime= remindSendTime ?? this.remindSendTime
			..sellerIconPath= sellerIconPath ?? this.sellerIconPath
			..sellerName= sellerName ?? this.sellerName
			..sellerUserId= sellerUserId ?? this.sellerUserId
			..sendTime= sendTime ?? this.sendTime
			..shopId= shopId ?? this.shopId
			..status= status ?? this.status
			..type= type ?? this.type
			..userId= userId ?? this.userId
			..userName= userName ?? this.userName;
	}

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class XinHeOrderItemModelOrderItems {
	String? createTime;
	int? fCreateUserId;
	int? fGoodsId;
	int? fGoodsPriceId;
	int? fOrderId;
	int? fUpdateUserId;
	int? fUserId;
	int? goodsAmount;
	int? goodsPrice;
	int? id;
	int? itemPrice;
	String? remark;
	int? removed;
	String? updateTime;
	@JSONField(name: "version_num")
	int? versionNum;
	int? zoneType;

	XinHeOrderItemModelOrderItems();

	factory XinHeOrderItemModelOrderItems.fromJson(Map<String, dynamic> json) => $XinHeOrderItemModelOrderItemsFromJson(json);

	Map<String, dynamic> toJson() => $XinHeOrderItemModelOrderItemsToJson(this);

	XinHeOrderItemModelOrderItems copyWith({String? createTime, int? fCreateUserId, int? fGoodsId, int? fGoodsPriceId, int? fOrderId, int? fUpdateUserId, int? fUserId, int? goodsAmount, int? goodsPrice, int? id, int? itemPrice, String? remark, int? removed, String? updateTime, int? versionNum, int? zoneType}) {
		return XinHeOrderItemModelOrderItems()
			..createTime= createTime ?? this.createTime
			..fCreateUserId= fCreateUserId ?? this.fCreateUserId
			..fGoodsId= fGoodsId ?? this.fGoodsId
			..fGoodsPriceId= fGoodsPriceId ?? this.fGoodsPriceId
			..fOrderId= fOrderId ?? this.fOrderId
			..fUpdateUserId= fUpdateUserId ?? this.fUpdateUserId
			..fUserId= fUserId ?? this.fUserId
			..goodsAmount= goodsAmount ?? this.goodsAmount
			..goodsPrice= goodsPrice ?? this.goodsPrice
			..id= id ?? this.id
			..itemPrice= itemPrice ?? this.itemPrice
			..remark= remark ?? this.remark
			..removed= removed ?? this.removed
			..updateTime= updateTime ?? this.updateTime
			..versionNum= versionNum ?? this.versionNum
			..zoneType= zoneType ?? this.zoneType;
	}

	@override
	String toString() {
		return jsonEncode(this);
	}
}